package com.dk.service.impl;

import com.dk.mapper.TabSellerMapper;
import com.dk.pojo.TabSeller;
import com.dk.service.TabSellService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TabSellServiceImpl implements TabSellService {
    @Autowired
    private TabSellerMapper tabSellerMapper;

    @Override
    public List<TabSeller> getInfo(String sname) {
        return tabSellerMapper.select(sname);
    }

    @Override
    public int insert(TabSeller tabSeller) {
        return tabSellerMapper.insert(tabSeller);
    }

    @Override
    public TabSeller selectById(Integer cid) {
        return tabSellerMapper.selectByPrimaryKey(cid);
    }

    @Override
    public int updateInfo(TabSeller tabSeller) {
        return tabSellerMapper.updateByPrimaryKey(tabSeller);
    }

    @Override
    public int deleteById(Integer cid) {
        return tabSellerMapper.deleteByPrimaryKey(cid);
    }

    @Override
    public List<TabSeller> getInfoSell() {
        return tabSellerMapper.selectByExample(null);
    }
}
